home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2000 July / CD 3 / redhat-6.2.iso / RedHat / instimage / usr / lib / rpm / macros next >
Encoding:
Text File  |  2000-03-01  |  16.7 KB  |  552 lines

  1. # $Id: macros.in,v 1.46 2000/02/13 19:24:19 jbj Exp $
  2. #==============================================================================
  3. # Macro naming conventions (preliminary):
  4. #
  5. #    Macros that begin with an underscore are "local" in the sense that
  6. #    they (if used) will not be exported in rpm headers. Some macros
  7. #    that don't start with an underscore (but look like they should)
  8. #    are compatible with macros generated by rpm-2.5.x and will be made
  9. #    more consistent in a future release.
  10. #
  11.  
  12. #==============================================================================
  13. # ---- A macro that expands to nothing.
  14. #
  15. %nil    %{!?nil}
  16.  
  17. #==============================================================================
  18. # ---- filesystem macros.
  19. #
  20. %_usr            /usr
  21. %_usrsrc        %{_usr}/src
  22. %_var            /var
  23.  
  24. #==============================================================================
  25. # ---- Generally useful path macros.
  26. #
  27. %__awk            gawk
  28. %__bzip2        %{_bzip2bin}
  29. %__cat            /bin/cat
  30. %__chgrp        /bin/chgrp
  31. %__chmod        /bin/chmod
  32. %__chown        /bin/chown
  33. %__cp            /bin/cp
  34. %__cpio            /bin/cpio
  35. %__gzip            %{_gzipbin}
  36. %__id            /usr/bin/id
  37. %__install        /usr/bin/install
  38. %__ln_s            ln -s
  39. %__make            /usr/bin/make
  40. %__mkdir        /bin/mkdir
  41. %__mkdir_p        /bin/mkdir -p
  42. %__mv            /bin/mv
  43. %__patch        /usr/bin/patch
  44. %__pgp            %{_pgpbin}
  45. %__rm            /bin/rm
  46. %__rsh            /usr/bin/rsh
  47. %__ssh            /usr/bin/ssh
  48. %__tar            /bin/tar
  49.  
  50. #==============================================================================
  51. # ---- Build system path macros.
  52. #
  53. %__ar            ar
  54. %__cc            gcc
  55. %__cpp            gcc -E
  56. %__ld            /usr/bin/ld
  57. %__nm            /usr/bin/nm
  58. %__objcopy        /usr/bin/objcopy
  59. %__objdump        /usr/bin/objdump
  60. %__ranlib        ranlib
  61. %__remsh        %{__rsh}
  62. %__strip        /usr/bin/strip
  63.  
  64. # XXX avoid failures if tools are not installed when rpm is built.
  65. %__libtoolize        libtoolize
  66. %__aclocal        aclocal
  67. %__autoheader        autoheader
  68. %__automake        automake
  69. %__autoconf        autoconf
  70.  
  71. #==============================================================================
  72. # ---- Required rpmrc macros.
  73. #    Macros that used to be initialized as a side effect of rpmrc parsing.
  74. #    These are the default values that can be overridden by other
  75. #    (e.g. per-platform, per-system, per-packager, per-package) macros.
  76. #
  77. %_builddir        %{_topdir}/BUILD
  78. %_buildshell        /bin/sh
  79. %_bzip2bin        /usr/bin/bzip2
  80. %_dbpath        %{_var}/lib/rpm
  81. %_rebuilddbpath        %{_dbpath}
  82. %_defaultdocdir        %{_usr}/doc
  83. #
  84. %__find_provides    /usr/lib/rpm/find-provides
  85. %__find_requires    /usr/lib/rpm/find-requires
  86. #%__find_prereq        ???
  87. #%__find_conflicts    ???
  88. #%__find_obsoletes    ???
  89. #
  90. # XXX fixowner, fixgroup, and fixperms are run at the end of hardcoded setup
  91. %_fixowner        [ `%{__id} -u` = '0' ] && %{__chown} -Rhf root
  92. %_fixgroup        [ `%{__id} -u` = '0' ] && %{__chgrp} -Rhf root
  93. %_fixperms        %{__chmod} -Rf a+rX,g-w,o-w
  94. #
  95. %_gzipbin        /bin/gzip
  96. %_instchangelog        5
  97. %_pgpbin        /usr/bin/pgp
  98. %_rpmdir        %{_topdir}/RPMS
  99. #
  100. # XXX Note escaped %% for use in headerSprintf
  101. %_rpmfilename        %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
  102. %_signature        none
  103. %_sourcedir        %{_topdir}/SOURCES
  104. %_specdir        %{_topdir}/SPECS
  105. %_srcrpmdir        %{_topdir}/SRPMS
  106. %_tmppath        %{_var}/tmp
  107. %_topdir        %{_usrsrc}/redhat
  108.  
  109. #==============================================================================
  110. # ---- Optional rpmrc macros.
  111. #    Macros that are initialized as a side effect of rpmrc and/or spec
  112. #    file parsing.
  113. #
  114. #    Configurable build root path, same as BuildRoot: in a specfile.
  115. #    (Note: the configured macro value will override the spec file value).
  116. #
  117. #%buildroot
  118.  
  119. #    The sub-directory (relative to %{_builddir}) where sources are compiled.
  120. #    This macro is set after processing %setup, either explicitly from the
  121. #    value given to -n or the default name-version.
  122. #
  123. #%buildsubdir
  124.  
  125. #    Configurable distribution information, same as Distribution: in a
  126. #    specfile.
  127. #
  128. #%distribution
  129.  
  130. #    Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
  131. #    marked as %doc should be installed.
  132. #%_excludedocs
  133.  
  134. #    The port and machine name of a FTP proxy host running TIS firewall.
  135. #
  136. #%_ftpport
  137. #%_ftpproxy
  138.  
  139. #    The signature to use and the location of configuration files for
  140. #    signing packages with GNU gpg.
  141. #
  142. #%_gpg_name
  143. #%_gpg_path
  144.  
  145. #    The port and machine name of an HTTP proxy host.
  146. #
  147. #%_httpport
  148. #%_httpproxy
  149.  
  150. #    The PATH put into the environment before running %pre/%post et al.
  151. #
  152. %_install_script_path    /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
  153.  
  154. #    A colon separated list of desired locales to be installed;
  155. #    "all" means install all locale specific files.
  156. #    
  157. %_install_langs    all
  158.  
  159. #
  160. #    Deprecated.
  161. #%_langpatt
  162.  
  163. #    A colon separated list of paths where files should *not* be installed.
  164. #    Usually, these are network file system mount points.
  165. #
  166. #%_netsharedpath
  167.  
  168. #    Configurable packager information, same as Packager: in a specfile.
  169. #
  170. #%packager
  171.  
  172. #    Compression type and level for package payloads.
  173. #        "w9.gzdio"    gzip level 9 (default).
  174. #        "w9.bzdio"    bzip2 level 9 (experimental, at your own risk).
  175. #
  176. #%_payload_compression    w9.gzdio
  177.  
  178. #    The signature to use and the location of configuration files for
  179. #    signing packages with PGP.
  180. #
  181. #%_pgp_name
  182. #%_pgp_path
  183.  
  184. #    Configurable virtual provides (unimplemented, use Provides: ...
  185. #    in an rpmrc file).
  186. #
  187. #%_provides
  188.  
  189. #    Deprecated.
  190. #
  191. #%_timecheck
  192.  
  193. #    Configurable vendor information, same as Vendor: in a specfile.
  194. #
  195. #%vendor
  196.  
  197. #==============================================================================
  198. # ---- per-platform macros.
  199. #    Macros that are specific to an individual platform. The values here
  200. #    will be used if the per-platform macro file does not exist..
  201. #
  202. %_arch            i386
  203. %_vendor        redhat
  204. %_os            linux
  205. %_target_platform    %{_target_cpu}-%{_vendor}-%{_target_os}
  206. #
  207. # XXX use the rpmrc instantiated macro for now
  208. #%optflags        -O2
  209.  
  210. #==============================================================================
  211. # ---- Scriptlet template templates.
  212. #    Global defaults used for building scriptlet templates.
  213. #
  214. # XXX legacy configuration, this will be eliminated after rpm-3.0.4.
  215. %_preScriptEnvironment    \
  216. RPM_SOURCE_DIR=\"%{_sourcedir}\"\
  217. RPM_BUILD_DIR=\"%{_builddir}\"\
  218. RPM_OPT_FLAGS=\"%{optflags}\"\
  219. RPM_ARCH=\"%{_arch}\"\
  220. RPM_OS=\"%{_os}\"\
  221. export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
  222. RPM_DOC_DIR=\"%{_docdir}\"\
  223. export RPM_DOC_DIR\
  224. RPM_PACKAGE_NAME=\"%{name}\"\
  225. RPM_PACKAGE_VERSION=\"%{version}\"\
  226. RPM_PACKAGE_RELEASE=\"%{release}\"\
  227. export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
  228. %{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\
  229. export RPM_BUILD_ROOT}
  230.  
  231. %___build_shell        %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
  232. %___build_args        -e
  233. %___build_cmd        %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
  234. %___build_pre    \
  235. RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
  236. RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
  237. RPM_OPT_FLAGS=\"%{optflags}\"\
  238. RPM_ARCH=\"%{_arch}\"\
  239. RPM_OS=\"%{_os}\"\
  240. export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
  241. RPM_DOC_DIR=\"%{_docdir}\"\
  242. export RPM_DOC_DIR\
  243. RPM_PACKAGE_NAME=\"%{name}\"\
  244. RPM_PACKAGE_VERSION=\"%{version}\"\
  245. RPM_PACKAGE_RELEASE=\"%{release}\"\
  246. export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
  247. %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
  248. export RPM_BUILD_ROOT}\
  249. \
  250. %{verbose:set -x}%{!verbose:exec > /dev/null}\
  251. umask 022\
  252. cd %{u2p:%{_builddir}}\
  253.  
  254.  
  255. #%___build_body        %{nil}
  256. %___build_post        exit 0
  257.  
  258. %___build_template    #!%{___build_shell}\
  259. %{___build_pre}\
  260. %{nil}
  261.  
  262. #%{___build_body}\
  263. #%{___build_post}\
  264. #%{nil}
  265.  
  266. #==============================================================================
  267. # ---- Scriptlet templates.
  268. #    Macro(s) that expand to a command and script that is executed.
  269. #    CAVEAT: All macro expansions must fit in a BUFSIZ (8192 byte) buffer.
  270. #
  271. %__spec_prep_shell    %{___build_shell}
  272. %__spec_prep_args    %{___build_args}
  273. %__spec_prep_cmd    %{___build_cmd}
  274. %__spec_prep_pre    %{___build_pre}
  275. %__spec_prep_body    %{___build_body}
  276. %__spec_prep_post    %{___build_post}
  277. %__spec_prep_template    #!%{__spec_prep_shell}\
  278. %{__spec_prep_pre}\
  279. %{nil}
  280.  
  281. #%{__spec_prep_body}\
  282. #%{__spec_prep_post}\
  283. #%{nil}
  284.  
  285. %__spec_build_shell    %{___build_shell}
  286. %__spec_build_args    %{___build_args}
  287. %__spec_build_cmd    %{___build_cmd}
  288. %__spec_build_pre    %{___build_pre}
  289. %__spec_build_body    %{___build_body}
  290. %__spec_build_post    %{___build_post}
  291. %__spec_build_template    #!%{__spec_build_shell}\
  292. %{__spec_build_pre}\
  293. %{nil}
  294.  
  295. #%{__spec_build_body}\
  296. #%{__spec_build_post}\
  297. #%{nil}
  298.  
  299. %__spec_install_shell    %{___build_shell}
  300. %__spec_install_args    %{___build_args}
  301. %__spec_install_cmd    %{___build_cmd}
  302. %__spec_install_pre    %{___build_pre}
  303. %__spec_install_body    %{___build_body}
  304. %__spec_install_post    %{___build_post}
  305. %__spec_install_template    #!%{__spec_install_shell}\
  306. %{__spec_install_pre}\
  307. %{nil}
  308.  
  309. #%{__spec_install_body}\
  310. #%{__spec_install_post}\
  311. #%{nil}
  312.  
  313. #%__spec_autodep_shell    %{___build_shell}
  314. #%__spec_autodep_args    %{___build_args}
  315. #%__spec_autodep_cmd    %{___build_cmd}
  316. #%__spec_autodep_pre    %{___build_pre}
  317. #%__spec_autodep_body    %{___build_body}
  318. #%__spec_autodep_post    %{___build_post}
  319. #%__spec_autodep_template    #!%{__spec_autodep_shell}\
  320. #%{__spec_autodep_pre}\
  321. #%{nil}
  322.  
  323. #%{__spec_autodep_body}\
  324. #%{__spec_autodep_post}\
  325. #%{nil}
  326.  
  327. %__spec_clean_shell    %{___build_shell}
  328. %__spec_clean_args    %{___build_args}
  329. %__spec_clean_cmd    %{___build_cmd}
  330. %__spec_clean_pre    %{___build_pre}
  331. %__spec_clean_body    %{___build_body}
  332. %__spec_clean_post    %{___build_post}
  333. %__spec_clean_template    #!%{__spec_clean_shell}\
  334. %{__spec_clean_pre}\
  335. %{nil}
  336.  
  337. #%{__spec_clean_body}\
  338. #%{__spec_clean_post}\
  339. #%{nil}
  340.  
  341. %__spec_rmbuild_shell    %{___build_shell}
  342. %__spec_rmbuild_args    %{___build_args}
  343. %__spec_rmbuild_cmd    %{___build_cmd}
  344. %__spec_rmbuild_pre    %{___build_pre}
  345. %__spec_rmbuild_body    %{___build_body}
  346. %__spec_rmbuild_post    %{___build_post}
  347. %__spec_rmbuild_template    #!%{__spec_rmbuild_shell}\
  348. %{__spec_rmbuild_pre}\
  349. %{nil}
  350.  
  351. #%{__spec_rmbuild_body}\
  352. #%{__spec_rmbuild_post}\
  353. #%{nil}
  354.  
  355. # XXX We don't expand pre/post install scriptlets (yet).
  356. #%__spec_pre_pre        %{nil}
  357. #%__spec_pre_post        %{nil}
  358. #%__spec_post_pre        %{nil}
  359. #%__spec_post_post        %{nil}
  360. #%__spec_preun_pre        %{nil}
  361. #%__spec_preun_post        %{nil}
  362. #%__spec_postun_pre        %{nil}
  363. #%__spec_postun_post        %{nil}
  364. #%__spec_triggerpostun_pre    %{nil}
  365. #%__spec_triggerpostun_post    %{nil}
  366. #%__spec_triggerun_pre        %{nil}
  367. #%__spec_triggerun_post        %{nil}
  368. #%__spec_triggerin_pre        %{nil}
  369. #%__spec_triggerin_post        %{nil}
  370.  
  371. #==============================================================================
  372. # ---- configure macros.
  373. #    Macro(s) slavishly copied from autoconf's config.status.
  374. #
  375. %_prefix        /usr
  376. %_exec_prefix        %{_prefix}
  377. %_bindir        %{_exec_prefix}/bin
  378. %_sbindir        %{_exec_prefix}/sbin
  379. %_libexecdir        %{_exec_prefix}/libexec
  380. %_datadir        %{_prefix}/share
  381. %_sysconfdir        %{_prefix}/etc
  382. %_sharedstatedir    %{_prefix}/com
  383. %_localstatedir        %{_prefix}/var
  384. %_libdir        %{_exec_prefix}/lib
  385. %_includedir        %{_prefix}/include
  386. %_oldincludedir        /usr/include
  387. %_infodir        %{_prefix}/info
  388. %_mandir        %{_prefix}/man
  389.  
  390. #==============================================================================
  391. # ---- config.guess platform macros.
  392. #    Macro(s) similar to the tokens used by configure.
  393. #
  394. %_build            %{_host}
  395. %_build_alias        %{_host_alias}
  396. %_build_cpu        %{_host_cpu}
  397. %_build_vendor        %{_host_vendor}
  398. %_build_os        %{_host_os}
  399. %_host            i686-pc-linux-gnu
  400. %_host_alias        i686-pc-linux-gnu
  401. %_host_cpu        i686
  402. %_host_vendor        pc
  403. %_host_os        linux-gnu
  404. %_target        %{_host}
  405. %_target_alias        %{_host_alias}
  406. %_target_cpu        %{_host_cpu}
  407. %_target_vendor        %{_host_vendor}
  408. %_target_os        %{_host_os}
  409.  
  410. #==============================================================================
  411. # ---- specfile macros.
  412. #    Macro(s) here can be used reliably for reproducible builds.
  413. #    (Note: Above is the goal, below are the macros under development)
  414. #
  415. # The configure macro does the following:
  416. #    optionally change to a subdirectory (not implemented).
  417. #    attempt to update config.guess and config.sub.
  418. #    run configure with correct prefix, platform, and CFLAGS.
  419. #    optionally restore current directory (not implemented).
  420. # The configure macro should be invoked as %configure (rather than %{configure})
  421. # because the rest of the arguments will be expanded using %*. Another
  422. # gotcha is that arguments, if present, should be on the same line as the
  423. # %configure.
  424. #
  425. %configure    \
  426.   %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
  427.   CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}
  428.  
  429. #------------------------------------------------------------------------------
  430. # This is an improved version of %configure that may replace the above
  431. # macro at some point (from PLD team).
  432. #
  433. #%configure { CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
  434. # CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
  435. # FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
  436. # ./configure %{_target_platform} \
  437. #     --prefix=%{_prefix} \
  438. #    --exec-prefix=%{_exec_prefix} \
  439. #    --bindir=%{_bindir} \
  440. #    --sbindir=%{_sbindir} \
  441. #    --sysconfdir=%{_sysconfdir} \
  442. #    --datadir=%{_datadir} \
  443. #    --includedir=%{_includedir} \
  444. #    --libdir=%{_libdir} \
  445. #    --libexecdir=%{_libexecdir} \
  446. #    --localstatedir=%{_localstatedir} \
  447. #    --sharedstatedir=%{_sharedstatedir} \
  448. #    --mandir=%{_mandir} \
  449. #    --infodir=%{_infodir} }
  450.  
  451. #------------------------------------------------------------------------------
  452. # The GNUconfigure macro does the following:
  453. #       update config.guess and config.sub.
  454. #       regenerate all autoconf/automake files
  455. #       optionally change to a directory (make the directory if requested).
  456. #       run configure with correct prefix, platform, and CFLAGS.
  457. #       optionally restore current directory.
  458. #
  459. # Based on autogen.sh from GNOME and orginal GNUconfigure
  460. #
  461. %GNUconfigure(MCs:)      \
  462.   CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS; \
  463.   LDFLAGS="${LDFLAGS:-'%{-s:-s}'}"  ; export LDFLAGS; \
  464.   %{-C:_mydir="`pwd`"; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}} \
  465.   dirs="`find ${_mydir} -name configure.in -print`"; export dirs; \
  466.     for coin in `echo ${dirs}` \
  467. do \
  468.   dr=`dirname ${coin}`; \
  469. if test -f ${dr}/NO-AUTO-GEN; then \
  470.  : \
  471. else \
  472.      macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
  473.     ( cd ${dr}; \
  474.       aclocalinclude="${ACLOCAL_FLAGS}"; \
  475.       for k in ${macrodirs}; do \
  476.         if test -d ${k}; then \
  477.           aclocalinclude="${aclocalinclude} -I ${k}"; \
  478.         ##else \
  479.         ##  echo "**Warning**: No such directory \`${k}'.  Ignored." \
  480.         fi \
  481.       done \
  482.       if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then \
  483.         if grep "sed.*POTFILES" configure.in >/dev/null; then \
  484.           : do nothing -- we still have an old unmodified configure.in \
  485.         else \
  486.           test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
  487.           echo "no" | gettextize --force --copy; \
  488.           test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
  489.         fi \
  490.       fi \
  491.       if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then \
  492.         %{__libtoolize} --force --copy; \
  493.       fi \
  494.       aclocal ${aclocalinclude}; \
  495.       if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then \
  496.         %{__autoheader}; \
  497.       fi \
  498.       echo "Running automake --gnu ${am_opt} ..."; \
  499.       %{__automake} --add-missing --gnu ${am_opt}; \
  500.       %{__autoconf}; \
  501.     ); \
  502.   fi \
  503. done \
  504.   %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} %* ; \
  505.   %{-C:cd ${_mydir}; unset _mydir}
  506.  
  507. #------------------------------------------------------------------------------
  508. # Useful perl macros (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
  509. #
  510. # For example, these can be used as (from ImageMagick.spec from PLD site)
  511. #    [...]
  512. #    BuildPrereq: perl
  513. #    [...]
  514. #    %package perl
  515. #    Summary: libraries and modules for access to ImageMagick from perl
  516. #    Group: Development/Languages/Perl
  517. #    Requires: %{name} = %{version}
  518. #    %requires_eq    perl
  519. #    [...]
  520. #    %install
  521. #    rm -fr $RPM_BUILD_ROOT
  522. #    install -d $RPM_BUILD_ROOT/%{perl_sitearch}
  523. #    [...]
  524. #    %files perl
  525. #    %defattr(644,root,root,755)
  526. #    %{perl_sitearch}/Image
  527. #    %dir %{perl_sitearch}/auto/Image
  528. #
  529. %requires_eq()    %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not")
  530. %perl_sitearch    %(eval "`perl -V:installsitearch`"; echo $installsitearch)
  531. %perl_archlib    %(eval "`perl -V:installarchlib`"; echo $installarchlib)
  532.  
  533. #------------------------------------------------------------------------------
  534. # arch macro for all Intel i?86 compatibile processors
  535. #  (Note: This macro (and it's analogues) will probably be obsoleted when
  536. #   rpm can use regular expressions against target platforms in macro
  537. #   conditionals. This change will be introduced after rpm-3.0.4).
  538. #
  539. %ix86   i386 i486 i586 i686 i786 i886 i986
  540.  
  541. #------------------------------------------------------------------------
  542. # Use in %install to generate locale specific file lists. For example,
  543. #
  544. # %install
  545. # ...
  546. # %find_lang %{name}
  547. # ...
  548. # %files -f %{name}.lang
  549. #
  550. %find_lang    /usr/lib/rpm/find-lang.sh %{buildroot}
  551.  
  552.